// console.dir(Promise);
/**
 * //https://blog.csdn.net/shan1991fei/article/details/78966297
 * @type {Promise<any>}
 * 学习地址
 */

let p = new Promise((resolve, reject) => {
  setTimeout(()=>{
    console.log('执行完成p1');
    resolve('随便什么数据');
  },2000)
});

let p2 = new Promise((resolve, reject) => {
  setTimeout(()=>{
    console.log('执行完成p2');
    resolve('随便什么数据');
  },5000)
});


let p3 = new Promise((resolve, reject) => {
  let a=[];

  for(let i=0;i<20000000;i++){
    a.push(i);
  }
  console.log(a);

  // setTimeout(()=>{
  //   console.log('执行完成p3');
  //   resolve('随便什么数据');
  // },1000)
});

let p4 = new Promise((resolve, reject) => {
  console.log('p4');
});
